<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE ScopedTypeVariables, ForeignFunctionInterface #-}</span><span class="hs-cpp">
#if __GLASGOW_HASKELL__ &gt;= 701
</span><span class="hs-pragma">{-# LANGUAGE Trustworthy #-}</span><span class="hs-cpp">
#endif
</span><span class="hs-comment">-- | Copyright   : (c) 2010 Jasper Van der Jeugt</span><span>
</span><span id="line-7"></span><span class="hs-comment">--                 (c) 2010 - 2011 Simon Meier</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- License       : BSD3-style (see LICENSE)</span><span>
</span><span id="line-9"></span><span class="hs-comment">--</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- Maintainer    : Simon Meier &lt;iridcode@gmail.com&gt;</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Portability   : GHC</span><span>
</span><span id="line-12"></span><span class="hs-comment">--</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- Encodings using ASCII encoded Unicode characters.</span><span>
</span><span id="line-14"></span><span class="hs-comment">--</span><span>
</span><span id="line-15"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Data.ByteString.Builder.Prim.ASCII</span><span>
</span><span id="line-16"></span><span>    </span><span class="hs-special">(</span><span>
</span><span id="line-17"></span><span>
</span><span id="line-18"></span><span>     </span><span class="annot"><span class="hs-comment">-- *** ASCII</span></span><span>
</span><span id="line-19"></span><span>     </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#char7"><span class="hs-identifier">char7</span></a></span><span>
</span><span id="line-20"></span><span>
</span><span id="line-21"></span><span>      </span><span class="annot"><span class="hs-comment">-- **** Decimal numbers</span></span><span>
</span><span id="line-22"></span><span>      </span><span class="annot"><span class="hs-comment">-- | Decimal encoding of numbers using ASCII encoded characters.</span></span><span>
</span><span id="line-23"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#int8Dec"><span class="hs-identifier">int8Dec</span></a></span><span>
</span><span id="line-24"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#int16Dec"><span class="hs-identifier">int16Dec</span></a></span><span>
</span><span id="line-25"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#int32Dec"><span class="hs-identifier">int32Dec</span></a></span><span>
</span><span id="line-26"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#int64Dec"><span class="hs-identifier">int64Dec</span></a></span><span>
</span><span id="line-27"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#intDec"><span class="hs-identifier">intDec</span></a></span><span>
</span><span id="line-28"></span><span>
</span><span id="line-29"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word8Dec"><span class="hs-identifier">word8Dec</span></a></span><span>
</span><span id="line-30"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word16Dec"><span class="hs-identifier">word16Dec</span></a></span><span>
</span><span id="line-31"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word32Dec"><span class="hs-identifier">word32Dec</span></a></span><span>
</span><span id="line-32"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word64Dec"><span class="hs-identifier">word64Dec</span></a></span><span>
</span><span id="line-33"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#wordDec"><span class="hs-identifier">wordDec</span></a></span><span>
</span><span id="line-34"></span><span>
</span><span id="line-35"></span><span>    </span><span class="hs-comment">{-
    -- These are the functions currently provided by Bryan O'Sullivans
    -- double-conversion library.
    --
    -- , float
    -- , floatWith
    -- , double
    -- , doubleWith
    -}</span><span>
</span><span id="line-44"></span><span>
</span><span id="line-45"></span><span>      </span><span class="annot"><span class="hs-comment">-- **** Hexadecimal numbers</span></span><span>
</span><span id="line-46"></span><span>
</span><span id="line-47"></span><span>      </span><span class="hs-comment">-- | Encoding positive integers as hexadecimal numbers using lower-case</span><span>
</span><span id="line-48"></span><span>      </span><span class="hs-comment">-- ASCII characters. The shortest possible representation is used. For</span><span>
</span><span id="line-49"></span><span>      </span><span class="hs-comment">-- example,</span><span>
</span><span id="line-50"></span><span>      </span><span class="hs-comment">--</span><span>
</span><span id="line-51"></span><span>      </span><span class="hs-comment">-- &gt; toLazyByteString (primBounded word16Hex 0x0a10) = &quot;a10&quot;</span><span>
</span><span id="line-52"></span><span>      </span><span class="hs-comment">--</span><span>
</span><span id="line-53"></span><span>      </span><span class="hs-comment">-- Note that there is no support for using upper-case characters. Please</span><span>
</span><span id="line-54"></span><span>      </span><span class="hs-comment">-- contact the maintainer if your application cannot work without</span><span>
</span><span id="line-55"></span><span>      </span><span class="hs-comment">-- hexadecimal encodings that use upper-case characters.</span><span>
</span><span id="line-56"></span><span>      </span><span class="hs-comment">--</span><span>
</span><span id="line-57"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word8Hex"><span class="hs-identifier">word8Hex</span></a></span><span>
</span><span id="line-58"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word16Hex"><span class="hs-identifier">word16Hex</span></a></span><span>
</span><span id="line-59"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word32Hex"><span class="hs-identifier">word32Hex</span></a></span><span>
</span><span id="line-60"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word64Hex"><span class="hs-identifier">word64Hex</span></a></span><span>
</span><span id="line-61"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#wordHex"><span class="hs-identifier">wordHex</span></a></span><span>
</span><span id="line-62"></span><span>
</span><span id="line-63"></span><span>      </span><span class="annot"><span class="hs-comment">-- **** Fixed-width hexadecimal numbers</span></span><span>
</span><span id="line-64"></span><span>      </span><span class="hs-comment">--</span><span>
</span><span id="line-65"></span><span>      </span><span class="hs-comment">-- | Encoding the bytes of fixed-width types as hexadecimal</span><span>
</span><span id="line-66"></span><span>      </span><span class="hs-comment">-- numbers using lower-case ASCII characters. For example,</span><span>
</span><span id="line-67"></span><span>      </span><span class="hs-comment">--</span><span>
</span><span id="line-68"></span><span>      </span><span class="hs-comment">-- &gt; toLazyByteString (primFixed word16HexFixed 0x0a10) = &quot;0a10&quot;</span><span>
</span><span id="line-69"></span><span>      </span><span class="hs-comment">--</span><span>
</span><span id="line-70"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#int8HexFixed"><span class="hs-identifier">int8HexFixed</span></a></span><span>
</span><span id="line-71"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#int16HexFixed"><span class="hs-identifier">int16HexFixed</span></a></span><span>
</span><span id="line-72"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#int32HexFixed"><span class="hs-identifier">int32HexFixed</span></a></span><span>
</span><span id="line-73"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#int64HexFixed"><span class="hs-identifier">int64HexFixed</span></a></span><span>
</span><span id="line-74"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word8HexFixed"><span class="hs-identifier">word8HexFixed</span></a></span><span>
</span><span id="line-75"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word16HexFixed"><span class="hs-identifier">word16HexFixed</span></a></span><span>
</span><span id="line-76"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word32HexFixed"><span class="hs-identifier">word32HexFixed</span></a></span><span>
</span><span id="line-77"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word64HexFixed"><span class="hs-identifier">word64HexFixed</span></a></span><span>
</span><span id="line-78"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#floatHexFixed"><span class="hs-identifier">floatHexFixed</span></a></span><span>
</span><span id="line-79"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#doubleHexFixed"><span class="hs-identifier">doubleHexFixed</span></a></span><span>
</span><span id="line-80"></span><span>
</span><span id="line-81"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-82"></span><span>
</span><span id="line-83"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.Binary.html"><span class="hs-identifier">Data.ByteString.Builder.Prim.Binary</span></a></span><span>
</span><span id="line-84"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.Internal.html"><span class="hs-identifier">Data.ByteString.Builder.Prim.Internal</span></a></span><span>
</span><span id="line-85"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.Internal.Floating.html"><span class="hs-identifier">Data.ByteString.Builder.Prim.Internal.Floating</span></a></span><span>
</span><span id="line-86"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.Internal.Base16.html"><span class="hs-identifier">Data.ByteString.Builder.Prim.Internal.Base16</span></a></span><span>
</span><span id="line-87"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.Internal.UncheckedShifts.html"><span class="hs-identifier">Data.ByteString.Builder.Prim.Internal.UncheckedShifts</span></a></span><span>
</span><span id="line-88"></span><span>
</span><span id="line-89"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Char.html#"><span class="hs-identifier">Data.Char</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#ord"><span class="hs-identifier">ord</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-90"></span><span>
</span><span id="line-91"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Foreign.html#"><span class="hs-identifier">Foreign</span></a></span><span>
</span><span id="line-92"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Foreign.C.Types.html#"><span class="hs-identifier">Foreign.C.Types</span></a></span><span>
</span><span id="line-93"></span><span>
</span><span id="line-94"></span><span class="hs-comment">-- | Encode the least 7-bits of a 'Char' using the ASCII encoding.</span><span>
</span><span id="line-95"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#char7"><span class="hs-pragma hs-type">char7</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-96"></span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#char7"><span class="hs-identifier hs-type">char7</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.Internal.html#FixedPrim"><span class="hs-identifier hs-type">FixedPrim</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-97"></span><span id="char7"><span class="annot"><span class="annottext">char7 :: FixedPrim Char
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#char7"><span class="hs-identifier hs-var hs-var">char7</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679077260"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679077260"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word8
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Word8) -&gt; Int -&gt; Word8
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="../../base/src/GHC.Base.html#ord"><span class="hs-identifier hs-var">ord</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679077260"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0x7f</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Word8) -&gt; FixedPrim Word8 -&gt; FixedPrim Char
forall (f :: * -&gt; *) b a. Contravariant f =&gt; (b -&gt; a) -&gt; f a -&gt; f b
</span><a href="Data.ByteString.Builder.Prim.Internal.html#%3E%24%3C"><span class="hs-operator hs-var">&gt;$&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">FixedPrim Word8
</span><a href="Data.ByteString.Builder.Prim.Binary.html#word8"><span class="hs-identifier hs-var">word8</span></a></span><span>
</span><span id="line-98"></span><span>
</span><span id="line-99"></span><span>
</span><span id="line-100"></span><span class="hs-comment">------------------------------------------------------------------------------</span><span>
</span><span id="line-101"></span><span class="hs-comment">-- Decimal Encoding</span><span>
</span><span id="line-102"></span><span class="hs-comment">------------------------------------------------------------------------------</span><span>
</span><span id="line-103"></span><span>
</span><span id="line-104"></span><span class="hs-comment">-- Signed integers</span><span>
</span><span id="line-105"></span><span class="hs-comment">------------------</span><span>
</span><span id="line-106"></span><span>
</span><span id="line-107"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;static _hs_bytestring_int_dec&quot;</span></span><span> </span><span id="c_int_dec"><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#c_int_dec"><span class="hs-identifier hs-var">c_int_dec</span></a></span></span><span>
</span><span id="line-108"></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/Foreign.C.Types.html#CInt"><span class="hs-identifier hs-type">CInt</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-109"></span><span>
</span><span id="line-110"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;static _hs_bytestring_long_long_int_dec&quot;</span></span><span> </span><span id="c_long_long_int_dec"><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#c_long_long_int_dec"><span class="hs-identifier hs-var">c_long_long_int_dec</span></a></span></span><span>
</span><span id="line-111"></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/Foreign.C.Types.html#CLLong"><span class="hs-identifier hs-type">CLLong</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-112"></span><span>
</span><span id="line-113"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#encodeIntDecimal"><span class="hs-pragma hs-type">encodeIntDecimal</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-114"></span><span id="local-6989586621679077409"><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#encodeIntDecimal"><span class="hs-identifier hs-type">encodeIntDecimal</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Real.html#Integral"><span class="hs-identifier hs-type">Integral</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679077409"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.Internal.html#BoundedPrim"><span class="hs-identifier hs-type">BoundedPrim</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679077409"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-115"></span><span id="encodeIntDecimal"><span class="annot"><span class="annottext">encodeIntDecimal :: forall a. Integral a =&gt; Int -&gt; BoundedPrim a
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#encodeIntDecimal"><span class="hs-identifier hs-var hs-var">encodeIntDecimal</span></a></span></span><span> </span><span id="local-6989586621679077249"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679077249"><span class="hs-identifier hs-var">bound</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; (a -&gt; Ptr Word8 -&gt; IO (Ptr Word8)) -&gt; BoundedPrim a
forall a.
Int -&gt; (a -&gt; Ptr Word8 -&gt; IO (Ptr Word8)) -&gt; BoundedPrim a
</span><a href="Data.ByteString.Builder.Prim.Internal.html#boundedPrim"><span class="hs-identifier hs-var">boundedPrim</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679077249"><span class="hs-identifier hs-var">bound</span></a></span><span> </span><span class="annot"><span class="annottext">((a -&gt; Ptr Word8 -&gt; IO (Ptr Word8)) -&gt; BoundedPrim a)
-&gt; (a -&gt; Ptr Word8 -&gt; IO (Ptr Word8)) -&gt; BoundedPrim a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CInt -&gt; Ptr Word8 -&gt; IO (Ptr Word8)
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#c_int_dec"><span class="hs-identifier hs-var">c_int_dec</span></a></span><span> </span><span class="annot"><span class="annottext">(CInt -&gt; Ptr Word8 -&gt; IO (Ptr Word8))
-&gt; (a -&gt; CInt) -&gt; a -&gt; Ptr Word8 -&gt; IO (Ptr Word8)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; CInt
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span>
</span><span id="line-116"></span><span>
</span><span id="line-117"></span><span class="hs-comment">-- | Decimal encoding of an 'Int8'.</span><span>
</span><span id="line-118"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#int8Dec"><span class="hs-pragma hs-type">int8Dec</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-119"></span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#int8Dec"><span class="hs-identifier hs-type">int8Dec</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.Internal.html#BoundedPrim"><span class="hs-identifier hs-type">BoundedPrim</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int8"><span class="hs-identifier hs-type">Int8</span></a></span><span>
</span><span id="line-120"></span><span id="int8Dec"><span class="annot"><span class="annottext">int8Dec :: BoundedPrim Int8
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#int8Dec"><span class="hs-identifier hs-var hs-var">int8Dec</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; BoundedPrim Int8
forall a. Integral a =&gt; Int -&gt; BoundedPrim a
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#encodeIntDecimal"><span class="hs-identifier hs-var">encodeIntDecimal</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span>
</span><span id="line-121"></span><span>
</span><span id="line-122"></span><span class="hs-comment">-- | Decimal encoding of an 'Int16'.</span><span>
</span><span id="line-123"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#int16Dec"><span class="hs-pragma hs-type">int16Dec</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-124"></span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#int16Dec"><span class="hs-identifier hs-type">int16Dec</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.Internal.html#BoundedPrim"><span class="hs-identifier hs-type">BoundedPrim</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int16"><span class="hs-identifier hs-type">Int16</span></a></span><span>
</span><span id="line-125"></span><span id="int16Dec"><span class="annot"><span class="annottext">int16Dec :: BoundedPrim Int16
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#int16Dec"><span class="hs-identifier hs-var hs-var">int16Dec</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; BoundedPrim Int16
forall a. Integral a =&gt; Int -&gt; BoundedPrim a
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#encodeIntDecimal"><span class="hs-identifier hs-var">encodeIntDecimal</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">6</span></span><span>
</span><span id="line-126"></span><span>
</span><span id="line-127"></span><span>
</span><span id="line-128"></span><span class="hs-comment">-- | Decimal encoding of an 'Int32'.</span><span>
</span><span id="line-129"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#int32Dec"><span class="hs-pragma hs-type">int32Dec</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-130"></span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#int32Dec"><span class="hs-identifier hs-type">int32Dec</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.Internal.html#BoundedPrim"><span class="hs-identifier hs-type">BoundedPrim</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int32"><span class="hs-identifier hs-type">Int32</span></a></span><span>
</span><span id="line-131"></span><span id="int32Dec"><span class="annot"><span class="annottext">int32Dec :: BoundedPrim Int32
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#int32Dec"><span class="hs-identifier hs-var hs-var">int32Dec</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; BoundedPrim Int32
forall a. Integral a =&gt; Int -&gt; BoundedPrim a
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#encodeIntDecimal"><span class="hs-identifier hs-var">encodeIntDecimal</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">11</span></span><span>
</span><span id="line-132"></span><span>
</span><span id="line-133"></span><span class="hs-comment">-- | Decimal encoding of an 'Int64'.</span><span>
</span><span id="line-134"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#int64Dec"><span class="hs-pragma hs-type">int64Dec</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-135"></span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#int64Dec"><span class="hs-identifier hs-type">int64Dec</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.Internal.html#BoundedPrim"><span class="hs-identifier hs-type">BoundedPrim</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int64"><span class="hs-identifier hs-type">Int64</span></a></span><span>
</span><span id="line-136"></span><span id="int64Dec"><span class="annot"><span class="annottext">int64Dec :: BoundedPrim Int64
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#int64Dec"><span class="hs-identifier hs-var hs-var">int64Dec</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; (Int64 -&gt; Ptr Word8 -&gt; IO (Ptr Word8)) -&gt; BoundedPrim Int64
forall a.
Int -&gt; (a -&gt; Ptr Word8 -&gt; IO (Ptr Word8)) -&gt; BoundedPrim a
</span><a href="Data.ByteString.Builder.Prim.Internal.html#boundedPrim"><span class="hs-identifier hs-var">boundedPrim</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">20</span></span><span> </span><span class="annot"><span class="annottext">((Int64 -&gt; Ptr Word8 -&gt; IO (Ptr Word8)) -&gt; BoundedPrim Int64)
-&gt; (Int64 -&gt; Ptr Word8 -&gt; IO (Ptr Word8)) -&gt; BoundedPrim Int64
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CLLong -&gt; Ptr Word8 -&gt; IO (Ptr Word8)
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#c_long_long_int_dec"><span class="hs-identifier hs-var">c_long_long_int_dec</span></a></span><span> </span><span class="annot"><span class="annottext">(CLLong -&gt; Ptr Word8 -&gt; IO (Ptr Word8))
-&gt; (Int64 -&gt; CLLong) -&gt; Int64 -&gt; Ptr Word8 -&gt; IO (Ptr Word8)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; CLLong
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span>
</span><span id="line-137"></span><span>
</span><span id="line-138"></span><span class="hs-comment">-- | Decimal encoding of an 'Int'.</span><span>
</span><span id="line-139"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#intDec"><span class="hs-pragma hs-type">intDec</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-140"></span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#intDec"><span class="hs-identifier hs-type">intDec</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.Internal.html#BoundedPrim"><span class="hs-identifier hs-type">BoundedPrim</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-141"></span><span id="intDec"><span class="annot"><span class="annottext">intDec :: BoundedPrim Int
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#intDec"><span class="hs-identifier hs-var hs-var">intDec</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BoundedPrim Int -&gt; BoundedPrim Int -&gt; BoundedPrim Int
forall a. a -&gt; a -&gt; a
</span><a href="Data.ByteString.Builder.Prim.Internal.UncheckedShifts.html#caseWordSize_32_64"><span class="hs-identifier hs-var">caseWordSize_32_64</span></a></span><span>
</span><span id="line-142"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int32
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Int32) -&gt; BoundedPrim Int32 -&gt; BoundedPrim Int
forall (f :: * -&gt; *) b a. Contravariant f =&gt; (b -&gt; a) -&gt; f a -&gt; f b
</span><a href="Data.ByteString.Builder.Prim.Internal.html#%3E%24%3C"><span class="hs-operator hs-var">&gt;$&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">BoundedPrim Int32
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#int32Dec"><span class="hs-identifier hs-var">int32Dec</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-143"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int64
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Int64) -&gt; BoundedPrim Int64 -&gt; BoundedPrim Int
forall (f :: * -&gt; *) b a. Contravariant f =&gt; (b -&gt; a) -&gt; f a -&gt; f b
</span><a href="Data.ByteString.Builder.Prim.Internal.html#%3E%24%3C"><span class="hs-operator hs-var">&gt;$&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">BoundedPrim Int64
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#int64Dec"><span class="hs-identifier hs-var">int64Dec</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-144"></span><span>
</span><span id="line-145"></span><span>
</span><span id="line-146"></span><span class="hs-comment">-- Unsigned integers</span><span>
</span><span id="line-147"></span><span class="hs-comment">--------------------</span><span>
</span><span id="line-148"></span><span>
</span><span id="line-149"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;static _hs_bytestring_uint_dec&quot;</span></span><span> </span><span id="c_uint_dec"><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#c_uint_dec"><span class="hs-identifier hs-var">c_uint_dec</span></a></span></span><span>
</span><span id="line-150"></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/Foreign.C.Types.html#CUInt"><span class="hs-identifier hs-type">CUInt</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-151"></span><span>
</span><span id="line-152"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;static _hs_bytestring_long_long_uint_dec&quot;</span></span><span> </span><span id="c_long_long_uint_dec"><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#c_long_long_uint_dec"><span class="hs-identifier hs-var">c_long_long_uint_dec</span></a></span></span><span>
</span><span id="line-153"></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/Foreign.C.Types.html#CULLong"><span class="hs-identifier hs-type">CULLong</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-154"></span><span>
</span><span id="line-155"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#encodeWordDecimal"><span class="hs-pragma hs-type">encodeWordDecimal</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-156"></span><span id="local-6989586621679077242"><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#encodeWordDecimal"><span class="hs-identifier hs-type">encodeWordDecimal</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Real.html#Integral"><span class="hs-identifier hs-type">Integral</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679077242"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.Internal.html#BoundedPrim"><span class="hs-identifier hs-type">BoundedPrim</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679077242"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-157"></span><span id="encodeWordDecimal"><span class="annot"><span class="annottext">encodeWordDecimal :: forall a. Integral a =&gt; Int -&gt; BoundedPrim a
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#encodeWordDecimal"><span class="hs-identifier hs-var hs-var">encodeWordDecimal</span></a></span></span><span> </span><span id="local-6989586621679077237"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679077237"><span class="hs-identifier hs-var">bound</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; (a -&gt; Ptr Word8 -&gt; IO (Ptr Word8)) -&gt; BoundedPrim a
forall a.
Int -&gt; (a -&gt; Ptr Word8 -&gt; IO (Ptr Word8)) -&gt; BoundedPrim a
</span><a href="Data.ByteString.Builder.Prim.Internal.html#boundedPrim"><span class="hs-identifier hs-var">boundedPrim</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679077237"><span class="hs-identifier hs-var">bound</span></a></span><span> </span><span class="annot"><span class="annottext">((a -&gt; Ptr Word8 -&gt; IO (Ptr Word8)) -&gt; BoundedPrim a)
-&gt; (a -&gt; Ptr Word8 -&gt; IO (Ptr Word8)) -&gt; BoundedPrim a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CUInt -&gt; Ptr Word8 -&gt; IO (Ptr Word8)
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#c_uint_dec"><span class="hs-identifier hs-var">c_uint_dec</span></a></span><span> </span><span class="annot"><span class="annottext">(CUInt -&gt; Ptr Word8 -&gt; IO (Ptr Word8))
-&gt; (a -&gt; CUInt) -&gt; a -&gt; Ptr Word8 -&gt; IO (Ptr Word8)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; CUInt
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span>
</span><span id="line-158"></span><span>
</span><span id="line-159"></span><span class="hs-comment">-- | Decimal encoding of a 'Word8'.</span><span>
</span><span id="line-160"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word8Dec"><span class="hs-pragma hs-type">word8Dec</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-161"></span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word8Dec"><span class="hs-identifier hs-type">word8Dec</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.Internal.html#BoundedPrim"><span class="hs-identifier hs-type">BoundedPrim</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span>
</span><span id="line-162"></span><span id="word8Dec"><span class="annot"><span class="annottext">word8Dec :: BoundedPrim Word8
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#word8Dec"><span class="hs-identifier hs-var hs-var">word8Dec</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; BoundedPrim Word8
forall a. Integral a =&gt; Int -&gt; BoundedPrim a
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#encodeWordDecimal"><span class="hs-identifier hs-var">encodeWordDecimal</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span>
</span><span id="line-163"></span><span>
</span><span id="line-164"></span><span class="hs-comment">-- | Decimal encoding of a 'Word16'.</span><span>
</span><span id="line-165"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word16Dec"><span class="hs-pragma hs-type">word16Dec</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-166"></span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word16Dec"><span class="hs-identifier hs-type">word16Dec</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.Internal.html#BoundedPrim"><span class="hs-identifier hs-type">BoundedPrim</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word16"><span class="hs-identifier hs-type">Word16</span></a></span><span>
</span><span id="line-167"></span><span id="word16Dec"><span class="annot"><span class="annottext">word16Dec :: BoundedPrim Word16
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#word16Dec"><span class="hs-identifier hs-var hs-var">word16Dec</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; BoundedPrim Word16
forall a. Integral a =&gt; Int -&gt; BoundedPrim a
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#encodeWordDecimal"><span class="hs-identifier hs-var">encodeWordDecimal</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">5</span></span><span>
</span><span id="line-168"></span><span>
</span><span id="line-169"></span><span class="hs-comment">-- | Decimal encoding of a 'Word32'.</span><span>
</span><span id="line-170"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word32Dec"><span class="hs-pragma hs-type">word32Dec</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-171"></span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word32Dec"><span class="hs-identifier hs-type">word32Dec</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.Internal.html#BoundedPrim"><span class="hs-identifier hs-type">BoundedPrim</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word32"><span class="hs-identifier hs-type">Word32</span></a></span><span>
</span><span id="line-172"></span><span id="word32Dec"><span class="annot"><span class="annottext">word32Dec :: BoundedPrim Word32
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#word32Dec"><span class="hs-identifier hs-var hs-var">word32Dec</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; BoundedPrim Word32
forall a. Integral a =&gt; Int -&gt; BoundedPrim a
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#encodeWordDecimal"><span class="hs-identifier hs-var">encodeWordDecimal</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">10</span></span><span>
</span><span id="line-173"></span><span>
</span><span id="line-174"></span><span class="hs-comment">-- | Decimal encoding of a 'Word64'.</span><span>
</span><span id="line-175"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word64Dec"><span class="hs-pragma hs-type">word64Dec</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-176"></span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word64Dec"><span class="hs-identifier hs-type">word64Dec</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.Internal.html#BoundedPrim"><span class="hs-identifier hs-type">BoundedPrim</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word64"><span class="hs-identifier hs-type">Word64</span></a></span><span>
</span><span id="line-177"></span><span id="word64Dec"><span class="annot"><span class="annottext">word64Dec :: BoundedPrim Word64
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#word64Dec"><span class="hs-identifier hs-var hs-var">word64Dec</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
-&gt; (Word64 -&gt; Ptr Word8 -&gt; IO (Ptr Word8)) -&gt; BoundedPrim Word64
forall a.
Int -&gt; (a -&gt; Ptr Word8 -&gt; IO (Ptr Word8)) -&gt; BoundedPrim a
</span><a href="Data.ByteString.Builder.Prim.Internal.html#boundedPrim"><span class="hs-identifier hs-var">boundedPrim</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">20</span></span><span> </span><span class="annot"><span class="annottext">((Word64 -&gt; Ptr Word8 -&gt; IO (Ptr Word8)) -&gt; BoundedPrim Word64)
-&gt; (Word64 -&gt; Ptr Word8 -&gt; IO (Ptr Word8)) -&gt; BoundedPrim Word64
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CULLong -&gt; Ptr Word8 -&gt; IO (Ptr Word8)
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#c_long_long_uint_dec"><span class="hs-identifier hs-var">c_long_long_uint_dec</span></a></span><span> </span><span class="annot"><span class="annottext">(CULLong -&gt; Ptr Word8 -&gt; IO (Ptr Word8))
-&gt; (Word64 -&gt; CULLong) -&gt; Word64 -&gt; Ptr Word8 -&gt; IO (Ptr Word8)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; CULLong
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span>
</span><span id="line-178"></span><span>
</span><span id="line-179"></span><span class="hs-comment">-- | Decimal encoding of a 'Word'.</span><span>
</span><span id="line-180"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#wordDec"><span class="hs-pragma hs-type">wordDec</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-181"></span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#wordDec"><span class="hs-identifier hs-type">wordDec</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.Internal.html#BoundedPrim"><span class="hs-identifier hs-type">BoundedPrim</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span>
</span><span id="line-182"></span><span id="wordDec"><span class="annot"><span class="annottext">wordDec :: BoundedPrim Word
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#wordDec"><span class="hs-identifier hs-var hs-var">wordDec</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BoundedPrim Word -&gt; BoundedPrim Word -&gt; BoundedPrim Word
forall a. a -&gt; a -&gt; a
</span><a href="Data.ByteString.Builder.Prim.Internal.UncheckedShifts.html#caseWordSize_32_64"><span class="hs-identifier hs-var">caseWordSize_32_64</span></a></span><span>
</span><span id="line-183"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word -&gt; Word32
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">(Word -&gt; Word32) -&gt; BoundedPrim Word32 -&gt; BoundedPrim Word
forall (f :: * -&gt; *) b a. Contravariant f =&gt; (b -&gt; a) -&gt; f a -&gt; f b
</span><a href="Data.ByteString.Builder.Prim.Internal.html#%3E%24%3C"><span class="hs-operator hs-var">&gt;$&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">BoundedPrim Word32
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#word32Dec"><span class="hs-identifier hs-var">word32Dec</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-184"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word -&gt; Word64
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">(Word -&gt; Word64) -&gt; BoundedPrim Word64 -&gt; BoundedPrim Word
forall (f :: * -&gt; *) b a. Contravariant f =&gt; (b -&gt; a) -&gt; f a -&gt; f b
</span><a href="Data.ByteString.Builder.Prim.Internal.html#%3E%24%3C"><span class="hs-operator hs-var">&gt;$&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">BoundedPrim Word64
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#word64Dec"><span class="hs-identifier hs-var">word64Dec</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-185"></span><span>
</span><span id="line-186"></span><span class="hs-comment">------------------------------------------------------------------------------</span><span>
</span><span id="line-187"></span><span class="hs-comment">-- Hexadecimal Encoding</span><span>
</span><span id="line-188"></span><span class="hs-comment">------------------------------------------------------------------------------</span><span>
</span><span id="line-189"></span><span>
</span><span id="line-190"></span><span class="hs-comment">-- without lead</span><span>
</span><span id="line-191"></span><span class="hs-comment">---------------</span><span>
</span><span id="line-192"></span><span>
</span><span id="line-193"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;static _hs_bytestring_uint_hex&quot;</span></span><span> </span><span id="c_uint_hex"><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#c_uint_hex"><span class="hs-identifier hs-var">c_uint_hex</span></a></span></span><span>
</span><span id="line-194"></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/Foreign.C.Types.html#CUInt"><span class="hs-identifier hs-type">CUInt</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-195"></span><span>
</span><span id="line-196"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;static _hs_bytestring_long_long_uint_hex&quot;</span></span><span> </span><span id="c_long_long_uint_hex"><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#c_long_long_uint_hex"><span class="hs-identifier hs-var">c_long_long_uint_hex</span></a></span></span><span>
</span><span id="line-197"></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/Foreign.C.Types.html#CULLong"><span class="hs-identifier hs-type">CULLong</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-198"></span><span>
</span><span id="line-199"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#encodeWordHex"><span class="hs-pragma hs-type">encodeWordHex</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-200"></span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#encodeWordHex"><span class="hs-identifier hs-type">encodeWordHex</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621679077399"><span class="annot"><a href="#local-6989586621679077399"><span class="hs-identifier hs-type">a</span></a></span></span><span class="hs-operator">.</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Foreign.Storable.html#Storable"><span class="hs-identifier hs-type">Storable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679077399"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Real.html#Integral"><span class="hs-identifier hs-type">Integral</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679077399"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.Internal.html#BoundedPrim"><span class="hs-identifier hs-type">BoundedPrim</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679077399"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-201"></span><span id="encodeWordHex"><span class="annot"><span class="annottext">encodeWordHex :: forall a. (Storable a, Integral a) =&gt; BoundedPrim a
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#encodeWordHex"><span class="hs-identifier hs-var hs-var">encodeWordHex</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-202"></span><span>    </span><span class="annot"><span class="annottext">Int -&gt; (a -&gt; Ptr Word8 -&gt; IO (Ptr Word8)) -&gt; BoundedPrim a
forall a.
Int -&gt; (a -&gt; Ptr Word8 -&gt; IO (Ptr Word8)) -&gt; BoundedPrim a
</span><a href="Data.ByteString.Builder.Prim.Internal.html#boundedPrim"><span class="hs-identifier hs-var">boundedPrim</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Int
forall a. Storable a =&gt; a -&gt; Int
</span><a href="../../base/src/Foreign.Storable.html#sizeOf"><span class="hs-identifier hs-var">sizeOf</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
forall a. HasCallStack =&gt; a
</span><a href="../../base/src/GHC.Err.html#undefined"><span class="hs-identifier hs-var">undefined</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679077399"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">((a -&gt; Ptr Word8 -&gt; IO (Ptr Word8)) -&gt; BoundedPrim a)
-&gt; (a -&gt; Ptr Word8 -&gt; IO (Ptr Word8)) -&gt; BoundedPrim a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CUInt -&gt; Ptr Word8 -&gt; IO (Ptr Word8)
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#c_uint_hex"><span class="hs-identifier hs-var">c_uint_hex</span></a></span><span>  </span><span class="annot"><span class="annottext">(CUInt -&gt; Ptr Word8 -&gt; IO (Ptr Word8))
-&gt; (a -&gt; CUInt) -&gt; a -&gt; Ptr Word8 -&gt; IO (Ptr Word8)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; CUInt
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span>
</span><span id="line-203"></span><span>
</span><span id="line-204"></span><span class="hs-comment">-- | Hexadecimal encoding of a 'Word8'.</span><span>
</span><span id="line-205"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word8Hex"><span class="hs-pragma hs-type">word8Hex</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-206"></span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word8Hex"><span class="hs-identifier hs-type">word8Hex</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.Internal.html#BoundedPrim"><span class="hs-identifier hs-type">BoundedPrim</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span>
</span><span id="line-207"></span><span id="word8Hex"><span class="annot"><span class="annottext">word8Hex :: BoundedPrim Word8
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#word8Hex"><span class="hs-identifier hs-var hs-var">word8Hex</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BoundedPrim Word8
forall a. (Storable a, Integral a) =&gt; BoundedPrim a
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#encodeWordHex"><span class="hs-identifier hs-var">encodeWordHex</span></a></span><span>
</span><span id="line-208"></span><span>
</span><span id="line-209"></span><span class="hs-comment">-- | Hexadecimal encoding of a 'Word16'.</span><span>
</span><span id="line-210"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word16Hex"><span class="hs-pragma hs-type">word16Hex</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-211"></span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word16Hex"><span class="hs-identifier hs-type">word16Hex</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.Internal.html#BoundedPrim"><span class="hs-identifier hs-type">BoundedPrim</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word16"><span class="hs-identifier hs-type">Word16</span></a></span><span>
</span><span id="line-212"></span><span id="word16Hex"><span class="annot"><span class="annottext">word16Hex :: BoundedPrim Word16
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#word16Hex"><span class="hs-identifier hs-var hs-var">word16Hex</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BoundedPrim Word16
forall a. (Storable a, Integral a) =&gt; BoundedPrim a
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#encodeWordHex"><span class="hs-identifier hs-var">encodeWordHex</span></a></span><span>
</span><span id="line-213"></span><span>
</span><span id="line-214"></span><span class="hs-comment">-- | Hexadecimal encoding of a 'Word32'.</span><span>
</span><span id="line-215"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word32Hex"><span class="hs-pragma hs-type">word32Hex</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-216"></span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word32Hex"><span class="hs-identifier hs-type">word32Hex</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.Internal.html#BoundedPrim"><span class="hs-identifier hs-type">BoundedPrim</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word32"><span class="hs-identifier hs-type">Word32</span></a></span><span>
</span><span id="line-217"></span><span id="word32Hex"><span class="annot"><span class="annottext">word32Hex :: BoundedPrim Word32
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#word32Hex"><span class="hs-identifier hs-var hs-var">word32Hex</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BoundedPrim Word32
forall a. (Storable a, Integral a) =&gt; BoundedPrim a
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#encodeWordHex"><span class="hs-identifier hs-var">encodeWordHex</span></a></span><span>
</span><span id="line-218"></span><span>
</span><span id="line-219"></span><span class="hs-comment">-- | Hexadecimal encoding of a 'Word64'.</span><span>
</span><span id="line-220"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word64Hex"><span class="hs-pragma hs-type">word64Hex</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-221"></span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word64Hex"><span class="hs-identifier hs-type">word64Hex</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.Internal.html#BoundedPrim"><span class="hs-identifier hs-type">BoundedPrim</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word64"><span class="hs-identifier hs-type">Word64</span></a></span><span>
</span><span id="line-222"></span><span id="word64Hex"><span class="annot"><span class="annottext">word64Hex :: BoundedPrim Word64
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#word64Hex"><span class="hs-identifier hs-var hs-var">word64Hex</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
-&gt; (Word64 -&gt; Ptr Word8 -&gt; IO (Ptr Word8)) -&gt; BoundedPrim Word64
forall a.
Int -&gt; (a -&gt; Ptr Word8 -&gt; IO (Ptr Word8)) -&gt; BoundedPrim a
</span><a href="Data.ByteString.Builder.Prim.Internal.html#boundedPrim"><span class="hs-identifier hs-var">boundedPrim</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">16</span></span><span> </span><span class="annot"><span class="annottext">((Word64 -&gt; Ptr Word8 -&gt; IO (Ptr Word8)) -&gt; BoundedPrim Word64)
-&gt; (Word64 -&gt; Ptr Word8 -&gt; IO (Ptr Word8)) -&gt; BoundedPrim Word64
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CULLong -&gt; Ptr Word8 -&gt; IO (Ptr Word8)
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#c_long_long_uint_hex"><span class="hs-identifier hs-var">c_long_long_uint_hex</span></a></span><span> </span><span class="annot"><span class="annottext">(CULLong -&gt; Ptr Word8 -&gt; IO (Ptr Word8))
-&gt; (Word64 -&gt; CULLong) -&gt; Word64 -&gt; Ptr Word8 -&gt; IO (Ptr Word8)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; CULLong
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span>
</span><span id="line-223"></span><span>
</span><span id="line-224"></span><span class="hs-comment">-- | Hexadecimal encoding of a 'Word'.</span><span>
</span><span id="line-225"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#wordHex"><span class="hs-pragma hs-type">wordHex</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-226"></span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#wordHex"><span class="hs-identifier hs-type">wordHex</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.Internal.html#BoundedPrim"><span class="hs-identifier hs-type">BoundedPrim</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span>
</span><span id="line-227"></span><span id="wordHex"><span class="annot"><span class="annottext">wordHex :: BoundedPrim Word
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#wordHex"><span class="hs-identifier hs-var hs-var">wordHex</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BoundedPrim Word -&gt; BoundedPrim Word -&gt; BoundedPrim Word
forall a. a -&gt; a -&gt; a
</span><a href="Data.ByteString.Builder.Prim.Internal.UncheckedShifts.html#caseWordSize_32_64"><span class="hs-identifier hs-var">caseWordSize_32_64</span></a></span><span>
</span><span id="line-228"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word -&gt; Word32
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">(Word -&gt; Word32) -&gt; BoundedPrim Word32 -&gt; BoundedPrim Word
forall (f :: * -&gt; *) b a. Contravariant f =&gt; (b -&gt; a) -&gt; f a -&gt; f b
</span><a href="Data.ByteString.Builder.Prim.Internal.html#%3E%24%3C"><span class="hs-operator hs-var">&gt;$&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">BoundedPrim Word32
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#word32Hex"><span class="hs-identifier hs-var">word32Hex</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-229"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word -&gt; Word64
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">(Word -&gt; Word64) -&gt; BoundedPrim Word64 -&gt; BoundedPrim Word
forall (f :: * -&gt; *) b a. Contravariant f =&gt; (b -&gt; a) -&gt; f a -&gt; f b
</span><a href="Data.ByteString.Builder.Prim.Internal.html#%3E%24%3C"><span class="hs-operator hs-var">&gt;$&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">BoundedPrim Word64
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#word64Hex"><span class="hs-identifier hs-var">word64Hex</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-230"></span><span>
</span><span id="line-231"></span><span>
</span><span id="line-232"></span><span class="hs-comment">-- fixed width; leading zeroes</span><span>
</span><span id="line-233"></span><span class="hs-comment">------------------------------</span><span>
</span><span id="line-234"></span><span>
</span><span id="line-235"></span><span class="hs-comment">-- | Encode a 'Word8' using 2 nibbles (hexadecimal digits).</span><span>
</span><span id="line-236"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word8HexFixed"><span class="hs-pragma hs-type">word8HexFixed</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-237"></span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word8HexFixed"><span class="hs-identifier hs-type">word8HexFixed</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.Internal.html#FixedPrim"><span class="hs-identifier hs-type">FixedPrim</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span>
</span><span id="line-238"></span><span id="word8HexFixed"><span class="annot"><span class="annottext">word8HexFixed :: FixedPrim Word8
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#word8HexFixed"><span class="hs-identifier hs-var hs-var">word8HexFixed</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; (Word8 -&gt; Ptr Word8 -&gt; IO ()) -&gt; FixedPrim Word8
forall a. Int -&gt; (a -&gt; Ptr Word8 -&gt; IO ()) -&gt; FixedPrim a
</span><a href="Data.ByteString.Builder.Prim.Internal.html#fixedPrim"><span class="hs-identifier hs-var">fixedPrim</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="annot"><span class="annottext">((Word8 -&gt; Ptr Word8 -&gt; IO ()) -&gt; FixedPrim Word8)
-&gt; (Word8 -&gt; Ptr Word8 -&gt; IO ()) -&gt; FixedPrim Word8
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-239"></span><span>    </span><span class="hs-glyph">\</span><span id="local-6989586621679077220"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679077220"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679077219"><span class="annot"><span class="annottext">Ptr Word8
</span><a href="#local-6989586621679077219"><span class="hs-identifier hs-var">op</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Ptr Word16 -&gt; Word16 -&gt; IO ()
forall a. Storable a =&gt; Ptr a -&gt; a -&gt; IO ()
</span><a href="../../base/src/Foreign.Storable.html#poke"><span class="hs-identifier hs-var">poke</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Ptr Word8 -&gt; Ptr Word16
forall a b. Ptr a -&gt; Ptr b
</span><a href="../../base/src/GHC.Ptr.html#castPtr"><span class="hs-identifier hs-var">castPtr</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr Word8
</span><a href="#local-6989586621679077219"><span class="hs-identifier hs-var">op</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Word16 -&gt; IO ()) -&gt; IO Word16 -&gt; IO ()
forall (m :: * -&gt; *) a b. Monad m =&gt; (a -&gt; m b) -&gt; m a -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3D%3C%3C"><span class="hs-operator hs-var">=&lt;&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">EncodingTable -&gt; Word8 -&gt; IO Word16
</span><a href="Data.ByteString.Builder.Prim.Internal.Base16.html#encode8_as_16h"><span class="hs-identifier hs-var">encode8_as_16h</span></a></span><span> </span><span class="annot"><span class="annottext">EncodingTable
</span><a href="Data.ByteString.Builder.Prim.Internal.Base16.html#lowerTable"><span class="hs-identifier hs-var">lowerTable</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679077220"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-240"></span><span>
</span><span id="line-241"></span><span class="hs-comment">-- | Encode a 'Word16' using 4 nibbles.</span><span>
</span><span id="line-242"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word16HexFixed"><span class="hs-pragma hs-type">word16HexFixed</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-243"></span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word16HexFixed"><span class="hs-identifier hs-type">word16HexFixed</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.Internal.html#FixedPrim"><span class="hs-identifier hs-type">FixedPrim</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word16"><span class="hs-identifier hs-type">Word16</span></a></span><span>
</span><span id="line-244"></span><span id="word16HexFixed"><span class="annot"><span class="annottext">word16HexFixed :: FixedPrim Word16
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#word16HexFixed"><span class="hs-identifier hs-var hs-var">word16HexFixed</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-245"></span><span>    </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679077213"><span class="annot"><span class="annottext">Word16
</span><a href="#local-6989586621679077213"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word16 -&gt; Word8
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">(Word16 -&gt; Word8) -&gt; Word16 -&gt; Word8
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Word16
</span><a href="#local-6989586621679077213"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; Int -&gt; Word16
</span><a href="Data.ByteString.Builder.Prim.Internal.UncheckedShifts.html#shiftr_w16"><span class="hs-operator hs-var">`shiftr_w16`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; Word8
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Word16
</span><a href="#local-6989586621679077213"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-246"></span><span>      </span><span class="annot"><span class="annottext">(Word16 -&gt; (Word8, Word8))
-&gt; FixedPrim (Word8, Word8) -&gt; FixedPrim Word16
forall (f :: * -&gt; *) b a. Contravariant f =&gt; (b -&gt; a) -&gt; f a -&gt; f b
</span><a href="Data.ByteString.Builder.Prim.Internal.html#%3E%24%3C"><span class="hs-operator hs-var">&gt;$&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">FixedPrim Word8 -&gt; FixedPrim Word8 -&gt; FixedPrim (Word8, Word8)
forall a b. FixedPrim a -&gt; FixedPrim b -&gt; FixedPrim (a, b)
</span><a href="Data.ByteString.Builder.Prim.Internal.html#pairF"><span class="hs-identifier hs-var">pairF</span></a></span><span> </span><span class="annot"><span class="annottext">FixedPrim Word8
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#word8HexFixed"><span class="hs-identifier hs-var">word8HexFixed</span></a></span><span> </span><span class="annot"><span class="annottext">FixedPrim Word8
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#word8HexFixed"><span class="hs-identifier hs-var">word8HexFixed</span></a></span><span>
</span><span id="line-247"></span><span>
</span><span id="line-248"></span><span class="hs-comment">-- | Encode a 'Word32' using 8 nibbles.</span><span>
</span><span id="line-249"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word32HexFixed"><span class="hs-pragma hs-type">word32HexFixed</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-250"></span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word32HexFixed"><span class="hs-identifier hs-type">word32HexFixed</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.Internal.html#FixedPrim"><span class="hs-identifier hs-type">FixedPrim</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word32"><span class="hs-identifier hs-type">Word32</span></a></span><span>
</span><span id="line-251"></span><span id="word32HexFixed"><span class="annot"><span class="annottext">word32HexFixed :: FixedPrim Word32
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#word32HexFixed"><span class="hs-identifier hs-var hs-var">word32HexFixed</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-252"></span><span>    </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679077210"><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679077210"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word32 -&gt; Word16
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">(Word32 -&gt; Word16) -&gt; Word32 -&gt; Word16
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679077210"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Int -&gt; Word32
</span><a href="Data.ByteString.Builder.Prim.Internal.UncheckedShifts.html#shiftr_w32"><span class="hs-operator hs-var">`shiftr_w32`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">16</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word16
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679077210"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-253"></span><span>      </span><span class="annot"><span class="annottext">(Word32 -&gt; (Word16, Word16))
-&gt; FixedPrim (Word16, Word16) -&gt; FixedPrim Word32
forall (f :: * -&gt; *) b a. Contravariant f =&gt; (b -&gt; a) -&gt; f a -&gt; f b
</span><a href="Data.ByteString.Builder.Prim.Internal.html#%3E%24%3C"><span class="hs-operator hs-var">&gt;$&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">FixedPrim Word16 -&gt; FixedPrim Word16 -&gt; FixedPrim (Word16, Word16)
forall a b. FixedPrim a -&gt; FixedPrim b -&gt; FixedPrim (a, b)
</span><a href="Data.ByteString.Builder.Prim.Internal.html#pairF"><span class="hs-identifier hs-var">pairF</span></a></span><span> </span><span class="annot"><span class="annottext">FixedPrim Word16
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#word16HexFixed"><span class="hs-identifier hs-var">word16HexFixed</span></a></span><span> </span><span class="annot"><span class="annottext">FixedPrim Word16
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#word16HexFixed"><span class="hs-identifier hs-var">word16HexFixed</span></a></span><span>
</span><span id="line-254"></span><span class="hs-comment">-- | Encode a 'Word64' using 16 nibbles.</span><span>
</span><span id="line-255"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word64HexFixed"><span class="hs-pragma hs-type">word64HexFixed</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-256"></span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#word64HexFixed"><span class="hs-identifier hs-type">word64HexFixed</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.Internal.html#FixedPrim"><span class="hs-identifier hs-type">FixedPrim</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word64"><span class="hs-identifier hs-type">Word64</span></a></span><span>
</span><span id="line-257"></span><span id="word64HexFixed"><span class="annot"><span class="annottext">word64HexFixed :: FixedPrim Word64
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#word64HexFixed"><span class="hs-identifier hs-var hs-var">word64HexFixed</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-258"></span><span>    </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679077208"><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679077208"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word64 -&gt; Word32
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">(Word64 -&gt; Word32) -&gt; Word64 -&gt; Word32
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679077208"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Int -&gt; Word64
</span><a href="Data.ByteString.Builder.Prim.Internal.UncheckedShifts.html#shiftr_w64"><span class="hs-operator hs-var">`shiftr_w64`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">32</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Word32
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679077208"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-259"></span><span>      </span><span class="annot"><span class="annottext">(Word64 -&gt; (Word32, Word32))
-&gt; FixedPrim (Word32, Word32) -&gt; FixedPrim Word64
forall (f :: * -&gt; *) b a. Contravariant f =&gt; (b -&gt; a) -&gt; f a -&gt; f b
</span><a href="Data.ByteString.Builder.Prim.Internal.html#%3E%24%3C"><span class="hs-operator hs-var">&gt;$&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">FixedPrim Word32 -&gt; FixedPrim Word32 -&gt; FixedPrim (Word32, Word32)
forall a b. FixedPrim a -&gt; FixedPrim b -&gt; FixedPrim (a, b)
</span><a href="Data.ByteString.Builder.Prim.Internal.html#pairF"><span class="hs-identifier hs-var">pairF</span></a></span><span> </span><span class="annot"><span class="annottext">FixedPrim Word32
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#word32HexFixed"><span class="hs-identifier hs-var">word32HexFixed</span></a></span><span> </span><span class="annot"><span class="annottext">FixedPrim Word32
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#word32HexFixed"><span class="hs-identifier hs-var">word32HexFixed</span></a></span><span>
</span><span id="line-260"></span><span>
</span><span id="line-261"></span><span class="hs-comment">-- | Encode a 'Int8' using 2 nibbles (hexadecimal digits).</span><span>
</span><span id="line-262"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#int8HexFixed"><span class="hs-pragma hs-type">int8HexFixed</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-263"></span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#int8HexFixed"><span class="hs-identifier hs-type">int8HexFixed</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.Internal.html#FixedPrim"><span class="hs-identifier hs-type">FixedPrim</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int8"><span class="hs-identifier hs-type">Int8</span></a></span><span>
</span><span id="line-264"></span><span id="int8HexFixed"><span class="annot"><span class="annottext">int8HexFixed :: FixedPrim Int8
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#int8HexFixed"><span class="hs-identifier hs-var hs-var">int8HexFixed</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int8 -&gt; Word8
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">(Int8 -&gt; Word8) -&gt; FixedPrim Word8 -&gt; FixedPrim Int8
forall (f :: * -&gt; *) b a. Contravariant f =&gt; (b -&gt; a) -&gt; f a -&gt; f b
</span><a href="Data.ByteString.Builder.Prim.Internal.html#%3E%24%3C"><span class="hs-operator hs-var">&gt;$&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">FixedPrim Word8
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#word8HexFixed"><span class="hs-identifier hs-var">word8HexFixed</span></a></span><span>
</span><span id="line-265"></span><span>
</span><span id="line-266"></span><span class="hs-comment">-- | Encode a 'Int16' using 4 nibbles.</span><span>
</span><span id="line-267"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#int16HexFixed"><span class="hs-pragma hs-type">int16HexFixed</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-268"></span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#int16HexFixed"><span class="hs-identifier hs-type">int16HexFixed</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.Internal.html#FixedPrim"><span class="hs-identifier hs-type">FixedPrim</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int16"><span class="hs-identifier hs-type">Int16</span></a></span><span>
</span><span id="line-269"></span><span id="int16HexFixed"><span class="annot"><span class="annottext">int16HexFixed :: FixedPrim Int16
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#int16HexFixed"><span class="hs-identifier hs-var hs-var">int16HexFixed</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int16 -&gt; Word16
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">(Int16 -&gt; Word16) -&gt; FixedPrim Word16 -&gt; FixedPrim Int16
forall (f :: * -&gt; *) b a. Contravariant f =&gt; (b -&gt; a) -&gt; f a -&gt; f b
</span><a href="Data.ByteString.Builder.Prim.Internal.html#%3E%24%3C"><span class="hs-operator hs-var">&gt;$&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">FixedPrim Word16
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#word16HexFixed"><span class="hs-identifier hs-var">word16HexFixed</span></a></span><span>
</span><span id="line-270"></span><span>
</span><span id="line-271"></span><span class="hs-comment">-- | Encode a 'Int32' using 8 nibbles.</span><span>
</span><span id="line-272"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#int32HexFixed"><span class="hs-pragma hs-type">int32HexFixed</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-273"></span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#int32HexFixed"><span class="hs-identifier hs-type">int32HexFixed</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.Internal.html#FixedPrim"><span class="hs-identifier hs-type">FixedPrim</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int32"><span class="hs-identifier hs-type">Int32</span></a></span><span>
</span><span id="line-274"></span><span id="int32HexFixed"><span class="annot"><span class="annottext">int32HexFixed :: FixedPrim Int32
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#int32HexFixed"><span class="hs-identifier hs-var hs-var">int32HexFixed</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int32 -&gt; Word32
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">(Int32 -&gt; Word32) -&gt; FixedPrim Word32 -&gt; FixedPrim Int32
forall (f :: * -&gt; *) b a. Contravariant f =&gt; (b -&gt; a) -&gt; f a -&gt; f b
</span><a href="Data.ByteString.Builder.Prim.Internal.html#%3E%24%3C"><span class="hs-operator hs-var">&gt;$&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">FixedPrim Word32
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#word32HexFixed"><span class="hs-identifier hs-var">word32HexFixed</span></a></span><span>
</span><span id="line-275"></span><span>
</span><span id="line-276"></span><span class="hs-comment">-- | Encode a 'Int64' using 16 nibbles.</span><span>
</span><span id="line-277"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#int64HexFixed"><span class="hs-pragma hs-type">int64HexFixed</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-278"></span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#int64HexFixed"><span class="hs-identifier hs-type">int64HexFixed</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.Internal.html#FixedPrim"><span class="hs-identifier hs-type">FixedPrim</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int64"><span class="hs-identifier hs-type">Int64</span></a></span><span>
</span><span id="line-279"></span><span id="int64HexFixed"><span class="annot"><span class="annottext">int64HexFixed :: FixedPrim Int64
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#int64HexFixed"><span class="hs-identifier hs-var hs-var">int64HexFixed</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Word64
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">(Int64 -&gt; Word64) -&gt; FixedPrim Word64 -&gt; FixedPrim Int64
forall (f :: * -&gt; *) b a. Contravariant f =&gt; (b -&gt; a) -&gt; f a -&gt; f b
</span><a href="Data.ByteString.Builder.Prim.Internal.html#%3E%24%3C"><span class="hs-operator hs-var">&gt;$&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">FixedPrim Word64
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#word64HexFixed"><span class="hs-identifier hs-var">word64HexFixed</span></a></span><span>
</span><span id="line-280"></span><span>
</span><span id="line-281"></span><span class="hs-comment">-- | Encode an IEEE 'Float' using 8 nibbles.</span><span>
</span><span id="line-282"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#floatHexFixed"><span class="hs-pragma hs-type">floatHexFixed</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-283"></span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#floatHexFixed"><span class="hs-identifier hs-type">floatHexFixed</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.Internal.html#FixedPrim"><span class="hs-identifier hs-type">FixedPrim</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span>
</span><span id="line-284"></span><span id="floatHexFixed"><span class="annot"><span class="annottext">floatHexFixed :: FixedPrim Float
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#floatHexFixed"><span class="hs-identifier hs-var hs-var">floatHexFixed</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FixedPrim Word32 -&gt; FixedPrim Float
</span><a href="Data.ByteString.Builder.Prim.Internal.Floating.html#encodeFloatViaWord32F"><span class="hs-identifier hs-var">encodeFloatViaWord32F</span></a></span><span> </span><span class="annot"><span class="annottext">FixedPrim Word32
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#word32HexFixed"><span class="hs-identifier hs-var">word32HexFixed</span></a></span><span>
</span><span id="line-285"></span><span>
</span><span id="line-286"></span><span class="hs-comment">-- | Encode an IEEE 'Double' using 16 nibbles.</span><span>
</span><span id="line-287"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#doubleHexFixed"><span class="hs-pragma hs-type">doubleHexFixed</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-288"></span><span class="annot"><a href="Data.ByteString.Builder.Prim.ASCII.html#doubleHexFixed"><span class="hs-identifier hs-type">doubleHexFixed</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.ByteString.Builder.Prim.Internal.html#FixedPrim"><span class="hs-identifier hs-type">FixedPrim</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span>
</span><span id="line-289"></span><span id="doubleHexFixed"><span class="annot"><span class="annottext">doubleHexFixed :: FixedPrim Double
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#doubleHexFixed"><span class="hs-identifier hs-var hs-var">doubleHexFixed</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FixedPrim Word64 -&gt; FixedPrim Double
</span><a href="Data.ByteString.Builder.Prim.Internal.Floating.html#encodeDoubleViaWord64F"><span class="hs-identifier hs-var">encodeDoubleViaWord64F</span></a></span><span> </span><span class="annot"><span class="annottext">FixedPrim Word64
</span><a href="Data.ByteString.Builder.Prim.ASCII.html#word64HexFixed"><span class="hs-identifier hs-var">word64HexFixed</span></a></span><span>
</span><span id="line-290"></span><span>
</span><span id="line-291"></span><span>
</span><span id="line-292"></span></pre></body></html>